#!/bin/sh
#
# git-pull-all -- pull all labs' repositories
#
# Copyright (C) 2016-2020 Wu Zhangjin <lzufalcon@163.com>
#

uname | grep -q MINGW && PWD_OPT="-W"
TOP_DIR="$(cd "$(dirname "$0")"/../../ && pwd $PWD_OPT)"
. "$TOP_DIR"/tools/docker/config $* >/dev/null

for lab in $LABS
do
    echo "LOG: Pulling repository: $lab"

    lab_dir="$LAB_DIR/$lab"
    [ -d "$lab_dir" ] && cd "$lab_dir" && git pull -v
done
